<?php

namespace app\common\validate;

use think\Validate;

//权限模型验证器
class Authgroup extends Validate
{
    protected $rule = [
        'title' => 'require|max:15|unique:authgroup',
    ];

    protected $message = [
        'title.require' => '用户组必须填写',
        'title.max' => '用户组不能大于15个字',
        'title.unique' => '用户组已经存在，请重新填写'
    ];

    protected $scene = [
        'add' => ['title'],
        'edit' => ['title']
    ];
}
